8  Online Appendix A

8.1 Setup

8.1.1 Install Packages

We install the following packages using the groundhog package manager to increase computational reproducibility.

options(repos = c(CRAN = "https://cran.r-project.org")) 

if (!requireNamespace("groundhog", quietly = TRUE)) {
    install.packages("groundhog")
    library("groundhog")
}

pkgs <- c("magrittr", "data.table", "stringr", "Rmisc", "ggplot2")

groundhog::groundhog.library(pkg = pkgs,
                             date = "2023-09-25")

8.1.2 Read Data

data      <- readRDS(file="../data/processed/full.Rda")
timeSpent <- data.table::fread(file = "../data/raw/PageTimes-2021-09-15.csv")
raw       <- data.table::fread(file="../data/raw/all_apps_wide_2021-09-15.csv")

8.1.3 Design

We define some design features in the following:

colors <- c("#F3B05C", "#1E4A75", "#65B5C0", "#AD5E21")

layout <- theme(panel.background = element_rect(fill = "white"),
                legend.key = element_rect(fill = "white"),
                panel.grid.major.y = element_line(colour = "grey", 
                                                  linewidth = 0.25),
                axis.ticks.y = element_blank(),
                panel.grid.major.x = element_blank(),
                axis.line.x.bottom = element_line(colour = "#000000", 
                                                  linewidth = 0.5),
                axis.line.y.left = element_blank(),
                plot.title = element_text(size = rel(1))
)

8.2 Figure OA1

timeSpent[,
          lag := shift(epoch_time_completed, fill = NA, type = "lag"),
          by = c("session_code", "participant_code")]
timeSpent[,
          duration := epoch_time_completed - lag,
          by = c("session_code", "participant_code")]
timeSpent[,
          completion := epoch_time_completed %>% max() - epoch_time_completed %>% min(),
          by = c("session_code", "participant_code")]

duration <- timeSpent[participant_code %in% data$participant.code,
                      .(
                        session_code,
                        participant_code,
                        app_name,
                        page_name,
                        page_index,
                        page_submission = epoch_time_completed,
                        time_spent = duration,
                        completion_time = completion
                      )]


N <- duration[, participant_code %>% unique() %>% length()]

tmp <- duration[app_name == "Baillon" & page_name == "Baillon_Decision",
                 .(time_spent = time_spent %>% sum()),
                 by = c("session_code", "participant_code", "page_index", "page_name")]

tmp[, round := page_index-2, by = c("participant_code")]

# remove outliers
plotDT <- tmp[,
               .SD[time_spent < quantile(time_spent, probs = 0.99)],
               by = page_index]

ggplot(data = summarySE(data = plotDT,
                        measurevar = "time_spent",
                        groupvars=c("round"),
                        na.rm = FALSE,
                        conf.interval = 0.95,
                        .drop = TRUE),
       mapping = aes(x = round, y = time_spent)) +
  geom_hline(yintercept = 0) +
  layout +
  theme(legend.position="bottom") +
  geom_line(show.legend=FALSE, color = colors[2], lty=2) +
  geom_errorbar(aes(ymin=time_spent-ci, ymax=time_spent+ci), width=.25, alpha = 0.5, color = colors[3]) +
  geom_point(color = colors[2]) +
  scale_x_continuous(name="", breaks = 1:12) +
  scale_y_continuous(limits = c(0, NA), expand = c(0, 0),
                     breaks = c(0,
                                plotDT[round == 1, time_spent %>% mean() %>% round(digits=0)],
                                plotDT[round == 2, time_spent %>% mean() %>% round(digits=0)],
                                plotDT[round == 7, time_spent %>% mean() %>% round(digits=0)],
                                plotDT[round == 12, time_spent %>% mean() %>% round(digits=0)])) +
  labs(y = "Response Time in Seconds", caption = "Bars indicate 95% confidence intervals.
\nOutliers (identified by 99.0 quantile) removed.")

rm(list = c("tmp", "timeSpent", "duration", "plotDT", "pkgs"))

Figure 8.1: Average response time of the 12 ambiguity tasks of the full sample (1505 observations; outliers removed as described in the figure).

8.3 Figure OA.2

ggplot(data = raw[nchar(participant.label) == 32 & session.is_demo == 0 & participant._index_in_pages < 20],
       aes(x=participant._index_in_pages)) + 
  geom_hline(yintercept = 0) +
  geom_histogram(binwidth = 1, 
                 fill = colors[2])  +
  scale_y_continuous(limits = c(0, NA), expand = c(0, 0)) +
  # scale_y_log10(breaks=c(0, 1, 2, 3, 4, 5, 10, 100), expand = c(0, NA)) +
  layout +
  labs(x = "Pages") +
  scale_x_continuous(breaks = c(2),
                     labels = c("Instructions")) +
  labs(y = "Count", x = "Pages")

Figure 8.2: Dropout participants of the experiment by page number.

raw[Intro.1.player.location == "Ilomantsi", 
    conditions := paste0("contrad.-",
                         str_replace_all(string = Intro.1.player.treatment, 
                                         pattern = "_", 
                                         replacement = " "))]

raw[Intro.1.player.location == "Weiskirchen", 
    conditions := paste0("conf.-",
                         str_replace_all(string = Intro.1.player.treatment, 
                                         pattern = "_", 
                                         replacement = " "))]

ggplot(raw[participant._index_in_pages > 8 & nchar(participant.label) == 32 & session.is_demo == 0 & participant._index_in_pages < 20],
       aes(x  = conditions)) + 
  geom_hline(yintercept = 0) +
  geom_bar(fill = colors[2])  +
  scale_y_continuous(limits = c(0, NA), expand = c(0, NA)) +
  layout +
  labs(x = "Treatments", y = "Count") 

Figure 8.3: Dropout participants by treatment after introduction of the treatment.